/**
 * 文件名：****.java
 * 版权：Copyright Lightkit All Rights Reserved.
 * 描述：*****
 */
package com.lightkits.wms.controller;

import com.lightkits.wms.domain.mainpage.QueryDefaultExecutor;
import com.lightkits.wms.domain.mainpage.QueryItemByMoNumExecutor;
import com.lightkits.wms.domain.mainpage.QueryOrganizationExecutor;
import com.lightkits.wms.domain.mainpage.QueryWorkerInfoExecutor;
import com.lightkits.wms.domain.mainpage.QueryItemInfoExecutor;
import com.lightkits.wms.domain.mainpage.QueryWareHouseInfoExecutor;

import com.lightkits.wms.dto.mainpage.QueryDefaultRequestType;
import com.lightkits.wms.dto.mainpage.QueryDefaultResponseType;
import com.lightkits.wms.dto.mainpage.QueryOrganizationRequestType;
import com.lightkits.wms.dto.mainpage.QueryOrganizationResponseType;
import com.lightkits.wms.dto.mainpage.QueryWorkerInfoRequestType;
import com.lightkits.wms.dto.mainpage.QueryWorkerInfoResponseType;
import com.lightkits.wms.dto.mainpage.QueryWareHouseRequestType;
import com.lightkits.wms.dto.mainpage.QueryWareHouseResponseType;
import com.lightkits.wms.dto.mainpage.QueryItemRequestType;
import com.lightkits.wms.dto.mainpage.QueryItemResponseType;
import com.lightkits.wms.dto.mainpage.QueryItemByMoNumRequestType;
import com.lightkits.wms.dto.mainpage.QueryItemByMoNumResponseType;


import io.choerodon.swagger.annotation.Permission;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * QueryOrganizationService
 *
 * @author menxiao.wu@hand-china.com
 * Created on 2019-02-20 15:00
 */
/*@SuppressWarnings("all")*/
/*@LightKitsContract(serviceName = "MainPageService", serviceNamespace = "center.soa.os-wms.com")*/
@RestController
@RequestMapping("/MainPageService")
public class MainPageController {
    /**
     * @param request QueryDefaultRequestType
     * @return QueryDefaultResponseType
     */
    @PostMapping(value = "/queryDefault")
    @Permission(permissionPublic = true)
    @ApiOperation(value = "/queryDefault")
    @ResponseBody
    public QueryDefaultResponseType queryDefault(
            @RequestBody(required = false) QueryDefaultRequestType request) {
        return queryDefaultExecutor.service(request);
    }

    @Autowired
    private QueryDefaultExecutor queryDefaultExecutor;

    /**
     * @param request QueryOrganizationRequestType
     * @return QueryOrganizationResponseType
     */
    @PostMapping(value = "/queryOrganization")
    @Permission(permissionPublic = true)
    @ApiOperation(value = "/queryOrganization")
    @ResponseBody
    public QueryOrganizationResponseType queryOrganization(
            @RequestBody(required = false) QueryOrganizationRequestType request) {
        return queryOrganizationExecutor.service(request);
    }

    @Autowired
    private QueryOrganizationExecutor queryOrganizationExecutor;

    /**
     * @param request QueryWorkerInfoRequestType
     * @return QueryWorkerInfoResponseType
     */
    @PostMapping(value = "/queryWorkerInfo")
    @Permission(permissionPublic = true)
    @ApiOperation(value = "/queryWorkerInfo")
    @ResponseBody
    public QueryWorkerInfoResponseType queryWorkerInfo(
            @RequestBody(required = false) QueryWorkerInfoRequestType request) {
        return queryWorkerInfoExecutor.service(request);
    }

    @Autowired
    private QueryWorkerInfoExecutor queryWorkerInfoExecutor;

    /**
     * @param request QueryItemByMoNumRequestType
     * @return QueryItemByMoNumResponseType
     */
    @PostMapping(value = "/queryItemByMoNum")
    @Permission(permissionPublic = true)
    @ApiOperation(value = "/queryItemByMoNum")
    @ResponseBody
    public QueryItemByMoNumResponseType queryItemByMoNum(
            @RequestBody(required = false) QueryItemByMoNumRequestType request) {
        return queryItemByMoNumExecutor.service(request);
    }

    @Autowired
    private QueryItemByMoNumExecutor queryItemByMoNumExecutor;

    /**
     * @param request QueryItemRequestType
     * @return QueryItemResponseType
     */
    @PostMapping(value = "/queryItemInfo")
    @Permission(permissionPublic = true)
    @ApiOperation(value = "/queryItemInfo")
    @ResponseBody
    public QueryItemResponseType queryItemInfo(
            @RequestBody(required = false) QueryItemRequestType request) {
        return queryItemInfoExecutor.service(request);
    }

    @Autowired
    private QueryItemInfoExecutor queryItemInfoExecutor;

    /**
     * @param request QueryWareHouseRequestType
     * @return QueryWareHouseResponseType
     */
    @PostMapping(value = "/queryWareHouse")
    @Permission(permissionPublic = true)
    @ApiOperation(value = "/queryWareHouse")
    @ResponseBody
    public QueryWareHouseResponseType queryWareHouse(
            @RequestBody(required = false) QueryWareHouseRequestType request) {
        return queryWareHouseInfoExecutor.service(request);
    }

    @Autowired
    private QueryWareHouseInfoExecutor queryWareHouseInfoExecutor;
}

